package com.ler.yrmall.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ler.yrmall.product.form.AttrGroupForm;
import com.ler.yrmall.product.vo.AttrGroupVO;
import com.ler.yrmall.product.vo.SpuBaseAttrGroupVO;
import com.ler.yrmall.product.entity.AttrGroupEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Leron
 */
public interface AttrGroupMapper extends BaseMapper<AttrGroupEntity> {

    List<SpuBaseAttrGroupVO> getAttrGroupWithAttrsBySpuId(@Param("spuId") Long spuId, @Param("categoryId") Long categoryId);

    IPage<AttrGroupVO> find(@Param("page") Page<AttrGroupEntity> page, @Param("request") AttrGroupForm request);

    List<AttrGroupVO> list(@Param("request") AttrGroupForm request);
}
